﻿<%@ Control Language="C#" %>


<script runat="server">
    private int type = 1;
    private int root_id = 0;
    private string Keepurl = "#";
    string keepparameter = "orginnal";
    private Boolean is_price_list = false;
    protected void Page_Load(object sender, EventArgs e)
    {
        Types types = new Types();
        /* 获取父菜单，如果默认0，尝试URL获取 */
        if (Root_Id == 0)
            Root_Id = Utils.GetQueryString("RCid", 0);
        Item_Lang = Utils.GetQueryString("lang", 1);
        Repeater_List.DataSource = types.List(Root_Id, Type, Item_Lang);
        Repeater_List.DataBind();
    }
    /// <summary>
    /// 对象类型
    /// </summary>
    /// 
    public int Type
    {
        get { return type; }
        set { type = value; }
    }
    public Boolean IsPriceList
    {
        get { return is_price_list; }
        set { is_price_list = value; }
    }

    /// <summary>
    /// 跟目录ID
    /// </summary>
    public int Root_Id
    {
        get { return root_id; }
        set { root_id = value; }
    }
    
    private int lang = 1;
    public int Item_Lang
    {
        get { return lang; }
        set { lang = value; }
    }
    public string KeepUrl
    {
        get { return Keepurl; }
        set { Keepurl = value; }
    }
    public string KeepParameter
    {
        get { return keepparameter; }
        set { keepparameter = value; }
    }
</script>
<ul class="child">
<asp:Repeater runat="server" ID="Repeater_List">
    <ItemTemplate>
        <li class="li<%#Eval("Id") %> li_root<%#Eval("Root_Id") %>">
            <a class="a<%#Eval("Id") %> a_root<%#Eval("Root_Id") %>" href="<%=KeepUrl%>&Cid=<%#Eval("Id") %>&lang=<%=Item_Lang %>&RCid=<%=Utils.GetQueryString("RCid", 0) %><%if(IsPriceList){ %> &price=<%#Eval("Name") %> <%} %>"><%#Eval("Name") %></a>
        </li>
    </ItemTemplate>
</asp:Repeater>
</ul>